package test1225;

public class Test05 {
    public static void main(String[] args) {
        // 合并2个数组中的元素
        int[] arr = {1,2,3};
        int[] brr = {4,5,6};
        int[] crr = new int[arr.length + brr.length];
        m05(arr, brr, crr);
        for (int c:crr) {
            System.out.println(c);
        }
    }
    public static void m05(int[] arr, int[] brr, int[] crr) {
        int index = 0;
        for (int i = 0; i < arr.length; i++) {
            crr[index++] = arr[i];
        }
        for (int i = 0; i < brr.length; i++) {
            crr[index++] = brr[i];
        }
    }
}
